using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using vnMcdonald.Models.Mapping;

namespace vnMcdonald.Models
{
    public partial class vnMcdonaldContext : DbContext
    {
        static vnMcdonaldContext()
        {
            Database.SetInitializer<vnMcdonaldContext>(null);
        }

        public vnMcdonaldContext()
            : base("Name=vnMcdonaldContext")
        {
        }

        public DbSet<Category> Categories { get; set; }
        public DbSet<Image> Images { get; set; }
        public DbSet<OrderDetail> OrderDetails { get; set; }
        public DbSet<Order> Orders { get; set; }
        public DbSet<Product> Products { get; set; }
        public DbSet<sysdiagram> sysdiagrams { get; set; }
        public DbSet<User> Users { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new CategoryMap());
            modelBuilder.Configurations.Add(new ImageMap());
            modelBuilder.Configurations.Add(new OrderDetailMap());
            modelBuilder.Configurations.Add(new OrderMap());
            modelBuilder.Configurations.Add(new ProductMap());
            modelBuilder.Configurations.Add(new sysdiagramMap());
            modelBuilder.Configurations.Add(new UserMap());
        }
    }
}
